<?php
/**
  * Vista base para todos los controladores
  *
  * @autor  Andres Hocevar <aahahocevar@gmail.com>
  * @package views
  */
?><!DOCTYPE html>
<html>
	<head>
	<title>Gestor de Actividades RAIS</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Content-type" content="text/html; charset=<?php echo $this->config->item('charset'); ?>" >
	<?php echo style('jquery.mobile-1.0.1.min.css');   ?>
	<?php echo style('jquery.mobile.datebox.min.css'); ?>


	<?php echo script('jquery-1.7.1.min.js');        ?>
	<?php echo script('jquery.mobile-1.0.1.min.js'); ?>
	<?php echo script('plugins/jquery.mobile.datebox.min.js'); ?>
	<?php echo script('plugins/jquery.mobile.datebox.i8n.es.js');      ?>
</head>
<body>
<script>
	$(document).bind("mobileinit", function(){
		<?php
			if(isset($onLoadScript)){
				echo $onLoadScript;
			}
		?>
	});
</script>
<div data-role="page">

	<div data-role="header">
		<?php
		$url = $this->uri->uri_string();
		$eurl= explode('/',$url);
		$lurl= array_pop($eurl);

		if(!empty($lurl)){
		if($lurl!='dashboard' && $lurl!='index' && $lurl!='login' && $lurl!='logout' && $lurl!='gcompalu'){ ?>
			<?php $url=(isset($home_url))? site_url($home_url) : site_url('dashboard'); ?>
			<a href="<?php echo $url; ?>" data-icon="home" data-iconpos="notext" data-direction="reverse">Inicio</a>
		<?php }
		}
		?>
		<h1><?php echo (isset($header))? $header :'GeRAIS'; ?></h1>
		<?php if(isset($back_url)){ ?>
			<a href="<?php echo site_url($back_url); ?>" data-icon="back" data-iconpos="notext" data-direction="reverse">Regresar</a>
		<?php } ?>
		<?php if(isset($logout)){ ?>
			<a href="<?php echo site_url('inicio/logout') ?>" data-theme="b" data-icon="minus">Salir</a>
		<?php } ?>
		<?php if(isset($headerextra)){ ?>
		<p style="clear: both; font-size: 85%; margin-bottom: 8px;"><?php echo $headerextra; ?></p>
		<?php } ?>
	</div>

	<div data-role="content" data-cache="never">
		<?php echo (isset($content))? $content :'Contenido'; ?>
	</div>

	<div data-role="footer">
		<h4><?php echo (isset($footer))? $footer :'Sistema GeRAIS'; ?></h4>
	</div>
</div>

</body>
</html>
